package com.navinfo.platform.dataanalysis.dto.condition;

import com.navinfo.platform.common.dto.DataInfo;
import lombok.Data;

@Data
public class NgCondition extends AbstractCondition {
    @Override
    public boolean subCondition(DataInfo dataInfo, Object ... externalParam) {
        int accPedalPos = dataInfo.getAccPedalPos();
        int rotation = dataInfo.getRotation();
        int speed = dataInfo.getSpeed();
        return accPedalPos == 0 && rotation > Integer.parseInt(param[0])  && rotation < Integer.parseInt(param[1]) && speed > Integer.parseInt(param[2]);
    }
}
